Client-side Events

Description

Pages relating to client-side Events in the Grid Builder.

Name
Description
afterAjaxCallbackComplete

Fires after any Ajax callback has completed and the Browser has received a response from the server.

afterAlphabetButtonSearch

Fires after the user has executed an Alphabet button search in the Grid Part.

afterDetailViewCancelEdits

Fires after user has cancelled edits in the Detail View part.

afterDetailViewClose

Fires after the Detail View has been closed.

afterDetailViewDeleteRecord

Fires after the user has deleted a record in the Detail View.

afterDetailViewNewRecord

Fires after the user has clicked a hyperlink or button to enter a new record in the Detail View.

afterDetailViewOpen

Fires after the Detail View for a record is shown.

afterDetailViewSubmit

Fires after the user has submitted edits made to a record in the Detail View.

afterDetailViewSwitchFromEditable

Fires when the user has switched the current record in the Detail View from editable to not editable. Only fires if the Detail View is set to edit on demand.

afterDetailViewSwitchToEditable

Fires when the user has switched the current record in the Detail View to be editable. Only fires if Detail View is set to edit on demand.

afterGridCancelEdits

Fires after the user has cancelled edits in the Grid Part by clicking on the Cancel button.

afterGridSubmit

Fires after the user has submitted edits to the Grid Part and the server has processed the data.

afterLookupGridFillinValues

Fires after a record has been selected from a Lookup Grid and the values from the Lookup Grid have been filled into the Parent Grid.

afterNamedLayoutSelect

Fires after the user has changed the current named Layout.

afterOpenLookup

Fires after the user has opened a Lookup Grid window.

afterPageNavigate

Fires after the user has navigated to a new page of records.

afterQBEHide

Fires after the user has hidden the Query by Example (QBE) row.

afterQBESearch

Fires after the user has performed a Query by Example (QBE) search.

afterQBEShow

Fires after the user has shown the Query by Example (QBE) row.

afterQuickSearch

Fires after the user has performed a Quick Search.

afterRowCancelEdits

Fires after the user cancels edits on a Grid row.

afterRowCollapse

Fires after the user collapses a row expander.

afterRowDelete

Fires after the user deletes a record by clicking the "Delete Record" button in a Grid row.

afterRowExpand

Fires after the user expands a row expander section.

afterRowPopulate

Fires after the Javascript grid method that populates a row as fired. Does not fire when a Grid is initialized.

afterRowSubmit

Fires after the user clicks the submit row button for a Grid Row and the server has processed the request.

afterRowSwitchFromEditable

Fires when the user has switched a row to non-editable mode. Grid must be set to 'Edit on Demand'.

afterRowSwitchToEditable

Fires when the user has switched a row to editable mode. Grid must be set to 'Edit on Demand'.

afterSavedSearchLoaded

Fires after the user loads Search Part criteria that were previously saved.

afterSearchClear

Fires after the user has cleared the Search part.

afterSearchSaved

Fires after the user saves the Search Part criteria.

afterSearchSubmit

Fires after the user has clicked the submit button on the Search part and the server has processed the request.

afterSetRowsPerPage

Fires after the user has changed the number of records per page displayed in the Grid.

afterSort

Fires after the user has sorted the records in the Grid by clicking on a column title.

beforeAjaxCallback

Fires before any Ajax callback is made to the server. This event can be used to put up a "working" message while the callback is executing.

beforeAutoRefresh

Fires when an auto-refresh of the Grid occurs.

beforeHTMLReportExport

Fires when the user clicks a toolbar button to export an HTML report to PDF, Excel, Word, or text.

canAlphabetButtonSearch

Fires when the user tries to perform an Alphabet button search. If the event returns false, the action is cancelled.

canDetailViewCancelEdits

Fires when the user tries to cancel edits in the Detail View. If the event returns false, the action is cancelled.

canDetailViewClose

Fires when the user tries to close the Detail View. If the event returns false, the action is cancelled.

canDetailViewDeleteRecord

Fires when the user tries to delete a record in the Detail View. If the event returns false, the action is cancelled.

canDetailViewNewRecord

Fires when the user tries to enter a new record in the Detail View. If the event returns false, the action is cancelled.

canDetailViewOpen

Fires when the user tries to display the Detail View for a row in the Grid Part. If the event returns false, the action is cancelled.

canDetailViewSubmit

Fires when the user tries to submit edits made to a record in the Detail View. If the event returns false, the action is cancelled.

canDetailViewSwitchFromEditable

Fires when the user tries to switch the Detail View from editable mode to non-editable mode. This event is only available if the Detail View is set to 'edit on demand'. If the event returns false, the action is cancelled.

canDetailViewSwitchToEditable

Fires when the user tries to switch the Detail View to editable mode. This event is only available if the Detail View is set to 'edit on demand'. If the event returns false, the action is cancelled.

canGridCancelEdits

Fires when the user tries to cancel edits made to the Grid. If the event returns false, the action is cancelled.

canGridSubmit

Fires when the user tries to submit all changes made to records in the Grid by clicking the "Submit" button. If the event returns false, the action is cancelled.

canLookupGridSelectRow

Fires before the user selects a row in a Lookup Grid. If the event returns false, the action is cancelled.

canNamedLayoutSelect

Fires when the user tries to change the named Layout. This event is only available if layout designs are enabled. If the event returns false, the action is cancelled.

canNewRowsShow

Fires when the user tries to show the new record rows in the Grid Part. The Grid must be configured to show new record rows on demand. If the event returns false, the action is cancelled.

canOpenLookup

Fires when the user tries to open the Lookup Grid window. If the event returns false, the action is cancelled.

canPageNavigate

Fires when the user tries to navigate to another page of records. If the event returns false, the action is cancelled.

canQBEHide

Fires when the user tries to close the Query by Example (QBE) row. If the event returns false, the action is cancelled.

canQBESearch

Fires when the user tries to do a Query by Example (QBE) search. If the event returns false, the action is cancelled.

canQBEShow

Fires when the user tries to show the Query by Example (QBE) row. If the event returns false, the action is cancelled.

canQuickSearch

Fires when the user tries to perform a Quick Search. If the event returns false, the action is cancelled.

canRowCancelEdits

Fires when the user tries to cancel edits made to an individual row in the Grid. If the event returns false, the action is cancelled.

canRowCollapse

Fires when the user tries to collapse an open row expander. If the event returns false, the action is cancelled.

canRowDelete

Fires when the user tries to delete a row. If the event returns false, the action is cancelled.

canRowExpand

Fires when the user tries to expand a closed row expander. If the event returns false, the action is cancelled.

canRowSubmit

Fires when the user tries to submit changes to a row. If the event returns false, the action is cancelled.

canRowSwitchFromEditable

Fires when the user switches the row to non-editable mode. The Grid's Row edit style property must be set to 'edit on demand'. If the event returns false, the action is cancelled.

canRowSwitchToEditable

Fires when the user switches the row to editable mode. The Grid's Row edit style property must be set to 'edit on demand'. If the event returns false, the action is cancelled.

canClearSearch

Fires when the user tries to clear the search criteria in the Search Part. If the event returns false, the clear action will be cancelled.

canSearchSubmit

Fires when the user tries to perform a search by clicking the Search button or when a control triggers an "auto-submit" in the Search Part. If the event returns false, the clear action will be cancelled.

canSetRowsPerPage

Fires when the user tries to set the number of rows per page. If the event returns false, the action is cancelled.

canSort

Fires when the user tries to sort the Grid by clicking on a column title. If the event returns false, the action is cancelled.

Desktop Applications and Working Preview - Client- side Xbasic

HTML events in a Grid (e.g. a control's onClick, onChange, onBlur, etc.) events are typically handled using Javascript functions. Now, in the case where you are using a Grid on the Desktop (which includes Working Preview mode), the function that is called to handle the event can either be defined using Javascript or Xbasic.

onAjaxCallbackFailed

The onAjaxCallbackFailed will fire if the server does not send a response back to the client within the default timeout period that the client waits for a response.

onDetailViewRender

Fires after the Detail View has been rendered.

onDetailViewStateChange

Fires when the Detail View state has changed. Possible states are 'view', 'change', and 'enter'.

onGridInitializeComplete

Fires after the Grid has been completely initialized and all HTML has been rendered. Does not fire on subsequent Ajax callbacks.

onGridRefresh

Fires when the Grid has been refreshed.

onGridRender

Fires after all of the records in the Grid Part have been rendered but before any system JavaScript events are triggered. Contrast with onGridRenderComplete which fires after all system JavaScript events are triggered.

onGridRenderComplete

The very last event to fire after the Grid has been completely rendered and all system JavaScript events have fired. Contrast with onGridRender which fires before all system JavaScript events are fired.

onGridRowCheck

Fires when the checkbox is checked or unchecked in a Grid Component with a checkbox column.

onGridStateChange

Fires when the state of the Grid has changed.

onImageError

Fires when an image in an element was not found. The e object passed in has an 'element' property.

onNewRowsHide

Fires when the user hides the new record rows in the Grid Part. The Grid must have been set to only show new record rows on demand.

onNewRowsShow

Fires when the user has shown the new record rows in the Grid Part. The Grid must have been set to only show new record rows on demand.

onObjectInitialize

Fires after the Grid object has been initialized. This event can be used to override settings defined in the Grid object.

onRowBlur

Fires when a Grid row loses focus.

onRowFocus

Fires when a Grid row gets focus. This event is only available for editable Grids.

onRowRefresh

Fires when a Grid row is refreshed.

onRowRender

Fires when a Grid row is rendered.

onRowSelect

Fires when a Grid row is selected.

onRowStateChange

Fires when the state of a Grid row has changed. Possible states are 'view', 'change', and 'enter'.

onSearchRender

Fires after the Search Part has been rendered.

Using Xbasic to Read and Write to a Table

The new Alpha Anywhere developer eventually comes to the point where he or she would like to write a script that directly reads from and writes to a table. This topic provides a couple of simple examples that you can elaborate upon. The are based on the Customer table in the AlphaSports sample database.

Validating User Input with Xbasic

Frequently you will wish to force a user's input to a form field to be non-blank, within a range, or one of several values. You can achieve these effects with Field Rules, but you can also code them with Xbasic.

webSocketOnMessage

Fires when a web socket server message is received.

webSocketSendMessageFail

Fires if an attempt was made to send a message to the web socket server, but the message was not sent.

webSocketServerClose

Fires when the web socket server is closed.

Two videos show how you can use client-side events to put up a simple "sorting ..." message while the Ajax callback is taking place after the user has clicked on a column heading to sort the grid.